package com.huawei.appgallery.assistantdock.gamemode.card;

import android.content.Context;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import o.beo$d;
import o.beo.f;
import o.bif.d;
import o.bif.i;
import o.bii;
import o.Logger;

public class PowerModeEnterCardBuoy extends BuoyBaseEnterCard {
    private i ʽ = i.POWER_SAVE_MODE;
    private String ᐝ;

    public PowerModeEnterCardBuoy(Context context) {
        super(context);
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        this.ʽ = bii.ˎ();
        ˋ(this.ʽ);
    }

    private void ˋ(i iVar) {
        switch (iVar) {
            case PERFOR_MODE:
                this.ˊ.setText(f.ˉ);
                this.ʼ.setBackgroundResource(beo$d.ˉ);
                this.ᐝ = "STATE3";
                return;
            case BALANCE_MODE:
                this.ˊ.setText(f.ˊॱ);
                this.ʼ.setBackgroundResource(beo$d.ˊˊ);
                this.ᐝ = "STATE1";
                return;
            case POWER_SAVE_MODE:
                this.ˊ.setText(f.ˊˊ);
                this.ʼ.setBackgroundResource(beo$d.ˏˏ);
                this.ᐝ = "STATE2";
                return;
            default:
                Logger.e("PowerModeEnterCardBuoy", "invalid tag:" + iVar);
                return;
        }
    }

    public void ˋ() {
        switch (this.ʽ) {
            case PERFOR_MODE:
                this.ʽ = i.POWER_SAVE_MODE;
                break;
            case BALANCE_MODE:
                this.ʽ = i.PERFOR_MODE;
                break;
            case POWER_SAVE_MODE:
                this.ʽ = i.BALANCE_MODE;
                break;
            default:
                Logger.e("PowerModeEnterCardBuoy", "invalid status:" + this.ʽ);
                break;
        }
        if (Logger.ˎ()) {
            Logger.ˏ("PowerModeEnterCardBuoy", "status is :" + this.ʽ);
        }
        ˋ(this.ʽ);
        bii.ˋ(this.ʽ);
        ʻ();
        ˏ(this.ᐝ);
    }

    String ᐝ() {
        return d.GSS_POWER_SAVING_MDOE.ˊ();
    }
}
